broadway: Correctly track surface visibility in client
authorAlexander Larsson <alexl@redhat.com>
Fri, 13 Mar 2020 09:49:44 +0000 (10:49 +0100)
committerAlexander Larsson <alexl@redhat.com>
Fri, 13 Mar 2020 14:00:32 +0000 (15:00 +0100)
We forgot to unset visible when hiding surfaces

gdk/broadway/broadway.js

index 5b8311427c6a7f1d03fc770da494dbf3b45bd44e..da1e06fb92f6d11364a62444c32737b34e680a98 100644 (file)
@@ -1061,6 +1061,7 @@ function handleCommands(cmd, display_commands, new_textures, modified_trees)
                 doUngrab();
             surface = surfaces[id];
             if (surface.visible) {
+                surface.visible = false;
                 display_commands.push([DISPLAY_OP_HIDE_SURFACE, surface.div]);
             }
             break;
@@ -1109,13 +1110,13 @@ function handleCommands(cmd, display_commands, new_textures, modified_trees)
             surface = surfaces[id];
             if (has_pos) {
                 surface.positioned = true;
-                surface.x = cmd.get_16s();;
-                surface.y = cmd.get_16s();;
+                surface.x = cmd.get_16s();
+                surface.y = cmd.get_16s();
                 display_commands.push([DISPLAY_OP_MOVE_NODE, surface.div, surface.x, surface.y]);
             }
             if (has_size) {
                 surface.width = cmd.get_16();
-                surface.height = cmd.get_16();;
+                surface.height = cmd.get_16();
                 display_commands.push([DISPLAY_OP_RESIZE_NODE, surface.div, surface.width, surface.height]);
 
             }